package priv.books.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import lombok.Data;

/**
    * 书籍表
    */
@Data
@TableName(value = "books")
public class Books {
    /**
     * 自增主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 书籍名
     */
    @TableField(value = "book_name")
    private String bookName;

    /**
     * 书籍作者
     */
    @TableField(value = "book_author")
    private String bookAuthor;

    /**
     * 书籍价格
     */
    @TableField(value = "book_price")
    private BigDecimal bookPrice;

    /**
     * 书籍库存
     */
    @TableField(value = "book_stock")
    private Integer bookStock;

    /**
     * 书籍销量
     */
    @TableField(value = "sales_volume")
    private Integer salesVolume;

    /**
     * 对应的类型ID
     */
    @TableField(value = "type_id")
    private Integer typeId;

    /**
     * 书籍出版社
     */
    @TableField(value = "book_published")
    private String bookPublished;

    /**
     * 书籍出版时间
     */
    @TableField(value = "book_time")
    private String bookTime;

    /**
     * 书籍类型信息
     */
    @TableField(exist = false)
    private BooksType booksType;

    public static final String COL_ID = "id";

    public static final String COL_BOOK_NAME = "book_name";

    public static final String COL_BOOK_AUTHOR = "book_author";

    public static final String COL_BOOK_PRICE = "book_price";

    public static final String COL_BOOK_STOCK = "book_stock";

    public static final String COL_SALES_VOLUME = "sales_volume";

    public static final String COL_TYPE_ID = "type_id";
}